home *** CD-ROM | disk | FTP | other *** search
- /*
- *--- PGetPrivateString.cpp -----------------------------------------------
- * Copyright (c) 1995-96 Adobe Systems Incorporated. All rights reserved.
- * Created on Thu, Oct 12, 1995 @ 10:43 PM by Paul Ferguson.
- *
- * Description: For notes about this class, refer to the
- * PCL documentation file PGetPrivateString.html
- *-------------------------------------------------------------------------
- */
- #include <string.h>
-
- #include "PMCQErrs.h"
- #include "PGetPrivateString.h"
- #include "PQuery.h"
- #include "PRequestBuf.h"
- #include "PReplyBuf.h"
-
- PGetPrivateString::PGetPrivateString
- ( const char * sDeveloperID,
- const char * sPluginID,
- short cTargetClass,
- unsigned long nTypeFlag,
- unsigned long nTargetID )
-
- : PHandleQuery()
-
- {
- if (strlen(sDeveloperID) != 4 || strlen(sPluginID) != 4)
- throw CQ_INVALID_CQ_ARG;
-
- PRequestBuf request(100); // plenty big to hold everything.
- request << sDeveloperID
- << sPluginID
- << cTargetClass
- << nTypeFlag
- << nTargetID;
-
-
- // NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE!
- // If the object has no private data, an exception
- // (CQ_NOPDATA) will be thrown. If you don't want
- // your plug-in to fail, you must handle the exception.
- PQuery query(pm_getprivatestring, request, itsHandle);
- InitHandle();
-
- PReplyBuf reply(replyPtr);
-
- reply >> cPlatform >> &sPrivateString;
- }
-
- // end of PGetPrivateString.cpp
-